<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ include file="/static/include/taglib.jsp"%>
<!DOCTYPE html >
<html>
<head>
 <meta name="viewport" content="width=device-width" />
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />  
 <title>后台管理--模板编辑</title>
 <link href="${ctxStatic}/layui/css/layui.css" rel="stylesheet" />
 <link href="${ctxStatic}/css/kpiuitanchu.css" rel="stylesheet" />
 <script src="${ctxStatic}/js/jquery-1.8.3.min.js?v=2.0" type="text/javascript"></script>
 <script src="${ctxStatic}/layui/layui.all.js"  type="text/javascript"></script>

</head>
<body >
  <form class="layui-form" id="formedit" name="formedit" action="add_atttb" method="post" target="d41d8cd98f00b204e9800998ecf8427e">
    <iframe name="d41d8cd98f00b204e9800998ecf8427e" src="about:blank" style="display:none;"></iframe>
     
     <div style="padding:10px ">
      <span style="font-size:14pt;font-weight: bold;">部门：</span>
      <span style="font-size:14pt;font-weight: bold;color:red">${userentity.orgname }</span>
      <span style="font-size:14pt;font-weight: bold;margin-left:50px">身份证号：</span>
      <span style="font-size:14pt;font-weight: bold;color:red">${userentity.cardno }</span>
      <span style="font-size:14pt;font-weight: bold;margin-left:50px">姓名：</span>
      <span style="font-size:14pt;font-weight: bold;color:red">${userentity.realname }</span>
     </div>
     
     <div class="indexcontent" >
         <table cellspacing="0" cellpadding="0" border="0" class="layui-table" style="margin:0;">
          <col width="70px"></col> 
         <!-- <col width="130px"></col> 
          <col width="150px"></col>  
          <col width="100px"></col> -->
          <col width="60px"></col>
          <col width="60px"></col>
          
          <col width="75px"></col>
          <col width="75px"></col>
          <col width="70px"></col>
          <col width="75px"></col>
          <col width="70px"></col>
          <col width="90px"></col>
          <col width="70px"></col>
          <col width="70px"></col>
          <col width="70px"></col>
          
          <col width="60px"></col>
          <col width="60px"></col>
          <col width="60px"></col>
          <col width="150px"></col>
          <col ></col>
              <thead>
                <tr>
                  <th rowspan="2">日期</th>
                  <!-- <th rowspan="2">单位</th>
                  <th rowspan="2">身份证号</th>
                  <th rowspan="2">姓名</th>-->
                  <th rowspan="2">是否出勤</th>
                  <th rowspan="2">是否加班</th>
                  <th colspan="9">未出勤</th>
                  <th rowspan="2">迟到</th>
                  <th rowspan="2">早退</th>
                  <th rowspan="2">旷工</th>
                  <th rowspan="2">备注</th>
                  <th rowspan="2"></th>
                </tr> 
                <tr>
                 <th>年休假</th>
                 <th>探亲假</th>
                 <th>婚假</th>
                 <th>生育假</th>
                 <th>丧假</th>
                 <th>因公致伤</th>
                 <th>病假</th>
                 <th>事假</th>
                 <th>其他</th>
                </tr>
              </thead>
         </table>
       
       <div class="selftable" id="selftable">
         <table cellspacing="0" cellpadding="0" border="0" class="layui-table" style="margin:0;">
          <col width="70px"></col> 
         <!--  <col width="130px"></col> 
          <col width="150px"></col> 
          <col width="100px"></col> -->
          <col width="60px"></col>
          <col width="60px"></col>
         
          <col width="75px"></col>
          <col width="75px"></col>
          <col width="70px"></col>
          <col width="75px"></col>
          <col width="70px"></col>
          <col width="90px"></col>
          <col width="70px"></col>
          <col width="70px"></col>
          <col width="70px"></col>
         
          <col width="60px"></col>
          <col width="60px"></col>
          <col width="60px"></col>
          <col width="150px"></col>
          <col ></col>
              <tbody>
               <c:forEach var="item" items="${dayslist}" varStatus="idxStatus">
                <tr>
                 <td>${item}</td>
                 <td style="padding:0"><select id="sfcq_${item}" name="sfcq_${item}"><option value="1">是</option><option value="0">否</option></select></td>
                 <td style="padding:0"><select name="sfjb_${item}"><option value="0">否</option><option value="1">是</option></select></td>
                 <td><input  name="nxj_${item}" class="layui-input layui-table-edit" value="0"/></td>
                 <td><input  name="tqj_${item}" class="layui-input layui-table-edit" value="0"/></td>
                 <td><input  name="hj_${item}" class="layui-input layui-table-edit" value="0"/></td>
                 <td><input  name="syj_${item}" class="layui-input layui-table-edit" value="0"/></td>
                 <td><input  name="sj_${item}" class="layui-input layui-table-edit" value="0"/></td>
                 <td><input  name="ygzs_${item}" class="layui-input layui-table-edit" value="0"/></td>
                 <td><input  name="bj_${item}" class="layui-input layui-table-edit" value="0"/></td>
                 <td><input  name="shij_${item}" class="layui-input layui-table-edit" value="0"/></td>
                 <td><input  name="qt_${item}" class="layui-input layui-table-edit" value="0"/></td>
                 <td style="padding:0"><select name="cd_${item}"><option value="0">否</option><option value="1">是</option></select></td>
                 <td style="padding:0"><select name="zt_${item}"><option value="0">否</option><option value="1">是</option></select></td>
                 <td style="padding:0"><select name="kg_${item}"><option value="0">否</option><option value="1">是</option></select></td>
                 <td style="padding:0"> <textarea style="min-height:100%" class="layui-textarea" placeholder="请输入内容"  name="remark_${item}" ></textarea></td>
                 <c:if test="${idxStatus.index==0 }">
                   <td rowspan="${fn:length(dayslist)}"></td>
                 </c:if>
              
                </tr>
               </c:forEach>
               
              </tbody>
            </table>
       </div>
     </div>

    
      <input type="hidden" name="userid" value="${userid }">
      <input type="hidden" name="year" value="${year }">
      <input type="hidden" name="mouth" value="${mouth }">
  
     <div style="width:90%;text-align: right;margin-top:15px;margin-right:100px">
   <button class="layui-btn" lay-submit="" lay-filter="demo1" id="btnsave">保存</button>
  <input type="button" class="layui-btn layui-btn-primary"  value="关闭" onclick="top.CloseOpenWindow()" />
 </div>
      
   </form>

  <script>
     $("#selftable").height($(window).height()-180);
     
     layui.use('form', function(){
    	   var form = layui.form; //只有执行了这一步，部分表单元素才会自动修饰成功
    	   form.render();
     });  
     
     function CloseDialog(result,msg){
   	  top.frames["iframe"].vAttTb.addresult(result,msg);
     }
     function ChangeSfcq(id,obj){
    	 //alert($(obj).val())
    	 //alert(1);
    	 if($(obj).val()==1){
    		 alert('sfcq'+'_'+id);
    		 //var select=document.getElementById('sfcq'+'_'+id);
    		 //select.selectedIndex = 1;
    		 
    		 //$('sfcq'+'_'+id).val(0);
    		 alert(JSON.stringify(document.formedit.sfcq_1));
    		 alert($('#sfcq'+'_'+id).val());
    		 $('#sfcq'+'_'+id).val(0);
    		 $('#sfcq'+'_'+id).selectedIndex=1;
    		 document.formedit.sfcq_1.selected=1;
    	 }
     }
    
  </script>
</body>
</html>